package com.teame.readbaby.parser;

import org.json.JSONException;

import com.alibaba.fastjson.JSONObject;
import com.teame.readbaby.util.Logger;
import com.teame.readbaby.vo.Logistics;

public class LogisticsParser  extends BaseParser<Logistics> {

	private static final String TAG = "LogisticsParser";

	@Override
	public Logistics parseJSON(String paramString) throws JSONException {
		if(paramString != null){
			String result = checkResponse(paramString);
			if(result == null){
				//TODO 弹出吐司或对话框提示用户
				return null;
			}
			JSONObject jsonObject = JSONObject.parseObject(paramString);
			String jsonLogistics = jsonObject.getString("logistics");
			Logistics logistics = JSONObject.parseObject(jsonLogistics, Logistics.class);
			return logistics;
		}
		return null;
	}

}
